package acm;

import java.util.Scanner;
import java.io.PrintStream;

public class Forg
{
	static Scanner sc = new Scanner(System.in);
	static PrintStream out = System.out;
	
	public static void main(String[] args)
	{
		long x,y,m,n,l;
		
		long distance;
		long speed;
		
		x = sc.nextLong();
		y = sc.nextLong();
		m = sc.nextLong();
		n = sc.nextLong();
		l = sc.nextLong();
		
		if( ( x>y && n>m ) || ( x<y && m>n ) )
		{
			distance = l - abs(x-y) % l;
			speed = abs(m-n);
		}
		else
		{
			distance = abs(x-y);
			speed = abs(m-n);
		}
		
		int i = 1;
		long old = distance;
		while(true)
		{
			distance += speed;
			
			if(distance >= l)
				distance -= l;
			
			if(distance == 0)
			{
				out.println(i);
				break;
			}
			
			if(distance == old)
			{
				out.println("Impossible");
				break;
			}
			
			i++;
		}
	}
	
	static long abs(long a)
	{
		if(a<0)
			return -a;
		else
			return a;
	}
}
